From: Matthias Clasen Date: Tue, 2 Oct 2012 17:32:55 +0000 (+0200) Subject: Calendar: hide all actions when on the login screen X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~5645 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=0f6effa26316c553e5c1074eb9ada1102c162d21;p=gnome-shell.git Calendar: hide all actions when on the login screen No events on the login screen, and no opening calendars or settings either. https://bugzilla.gnome.org/show_bug.cgi?id=685142 --- diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js index 2c455821d..7f01a7615 100644 --- a/js/ui/dateMenu.js +++ b/js/ui/dateMenu.js @@ -89,8 +89,10 @@ const DateMenuButton = new Lang.Class({ separator.setColumnWidths(1); vbox.add(separator.actor, {y_align: St.Align.END, expand: true, y_fill: false}); + item.actor.show_on_set_parent = false; item.actor.can_focus = false; item.actor.reparent(vbox); + this._dateAndTimeSeparator = separator; } this._separator = new St.DrawingArea({ style_class: 'calendar-vertical-separator', @@ -145,9 +147,18 @@ const DateMenuButton = new Lang.Class({ }, _setEventsVisibility: function(visible) { + this._openCalendarItem.actor.visible = visible; this._separator.visible = visible; - this._eventList.visible = visible; - this._openCalendarItem.visible = visible; + if (visible) { + let alignment = 0.25; + if (Clutter.get_default_text_direction() == Clutter.TextDirection.RTL) + alignment = 1.0 - alignment; + this.menu._arrowAlignment = alignment; + this._eventList.actor.get_parent().show(); + } else { + this.menu._arrowAlignment = 0.5; + this._eventList.actor.get_parent().hide(); + } }, _setEventSource: function(eventSource) { @@ -165,6 +176,10 @@ const DateMenuButton = new Lang.Class({ } this._setEventSource(eventSource); this._setEventsVisibility(showEvents); + + // This needs to be handled manually, as the code to + // autohide separators doesn't work across the vbox + this._dateAndTimeSeparator.actor.visible = Main.sessionMode.allowSettings; }, _updateClockAndDate: function() {